package com.zy.stock.domain;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 股票交易记录
 * @author zhangyi
 *
 */
public class StockTranscation {
	
	private Integer id;
	
	private Integer userId;//关联用户id
	
	private String userName;//关联用户名称
	
	private Integer stockId;//关联股票id
	
	private String stockName;//关联股票名称
	
	private String stockCode;//关联股票编码
	
	private String operation;//相关操作类型 1 建仓 2 首补 3 二次补仓 4 卖出（为以后考虑预留）5 现金分红 现金分红需要记录 否则无法正确统计盈亏 6 股票分红
	
	private Integer operateNum;//操作数量
	
	private Double value;//成交价
	
	private Double suggestValue;//建议价格
	
	private String status;//提醒状态 0 未完成 1 已完成 2 忽略
	
	private Date createTime;
	
	private Date updateTime;
	
	private String years;
	
	private String description;
	
	private String stockStatus;//1 建仓 2 首补 3 二次补仓 4 已卖出 5 其他（卖出之后剩余的部分）用于卖出的时候标记卖出的是哪个类型的已持有股票
	
	private Double cost;//操作时股票的成本 用于计算最后全卖光的时候的总盈亏 当某只股票持有为0时 计算盈亏的方法时查询最后一条卖出记录 根据当时的卖出价格 和成本价格计算最终盈亏
	
	private Integer userStockRlId;//当交易操作为卖出时 需要记录卖出的是其他的 还是持仓的股票
	
	private BigDecimal payCash;//支出金额 购买股票时的总金额 这里加上了各种扣款 如券商佣金、过户费
	
	private BigDecimal incomeCash;//收入金额 这里也是扣除各种税费后的金额 用于计算盈亏
	
	private UserStockRl rl;//
	
	private String userStockRlJsonStr;//这次交易之前的仓的数据 用于修改和删除是 仓的状态要回滚
			
	public String getUserStockRlJsonStr() {
		return userStockRlJsonStr;
	}

	public void setUserStockRlJsonStr(String userStockRlJsonStr) {
		this.userStockRlJsonStr = userStockRlJsonStr;
	}

	public BigDecimal getPayCash() {
		return payCash;
	}

	public void setPayCash(BigDecimal payCash) {
		this.payCash = payCash;
	}

	public BigDecimal getIncomeCash() {
		return incomeCash;
	}

	public void setIncomeCash(BigDecimal incomeCash) {
		this.incomeCash = incomeCash;
	}

	public UserStockRl getRl() {
		return rl;
	}

	public void setRl(UserStockRl rl) {
		this.rl = rl;
	}

	public Double getCost() {
		return cost;
	}

	public void setCost(Double cost) {
		this.cost = cost;
	}

	public String getStockStatus() {
		return stockStatus;
	}

	public void setStockStatus(String stockStatus) {
		this.stockStatus = stockStatus;
	}

	public String getYears() {
		return years;
	}

	public void setYears(String years) {
		this.years = years;
	}

	public Double getSuggestValue() {
		return suggestValue;
	}

	public void setSuggestValue(Double suggestValue) {
		this.suggestValue = suggestValue;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getStockId() {
		return stockId;
	}

	public void setStockId(Integer stockId) {
		this.stockId = stockId;
	}

	public String getStockName() {
		return stockName;
	}

	public void setStockName(String stockName) {
		this.stockName = stockName;
	}

	public String getStockCode() {
		return stockCode;
	}

	public void setStockCode(String stockCode) {
		this.stockCode = stockCode;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}

	public Integer getOperateNum() {
		return operateNum;
	}

	public void setOperateNum(Integer operateNum) {
		this.operateNum = operateNum;
	}

	public Double getValue() {
		return value;
	}

	public void setValue(Double value) {
		this.value = value;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getUserStockRlId() {
		return userStockRlId;
	}

	public void setUserStockRlId(Integer userStockRlId) {
		this.userStockRlId = userStockRlId;
	}			
}
